# Contributor: Díaz Urbaneja Diego <sodomon2@gmail.com>
# Maintainer: Díaz Urbaneja Diego <sodomon2@gmail.com>
pkgname=goxel
pkgver=0.15.1
pkgrel=0
pkgdesc="Open source 3D voxel editor"
url="https://goxel.xyz/"
arch="all"
license="GPL-3.0-only"
install="$pkgname.post-install"
makedepends="scons glfw-dev gtk+3.0-dev libpng-dev"
options="!check" # check function not implemented
source="https://github.com/guillaumechereau/goxel/archive/refs/tags/v$pkgver/goxel-$pkgver.tar.gz
	goxel.desktop
	"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	scons mode=release werror=false -j ${JOBS:-2}
}

package() {
	install -Dm775 goxel "$pkgdir"/usr/bin/goxel

	install -Dm644 icon.png "$pkgdir"/usr/share/icons/hicolor/1024x1024/apps/goxel.png
	install -Dm644 "$srcdir"/goxel.desktop "$pkgdir"/usr/share/applications/goxel.desktop
}

sha512sums="
b573e81a1a81644451af8e2b486fb0913d2075cb48e93b215a68e32c8fc08c293c627eb88074a01aa0af63a90b24664cf70fdcbf42ba9f4420b38bd368866069  goxel-0.15.1.tar.gz
10662d11d73a51d06db753b4f1727e05b1b9a5ef63ee4321cd4f445806f6162af010f89d7f98ff3ba25df14df1fb9bc8693a98d93206af208fdb28b7a49e46e9  goxel.desktop
"
